Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COO-178: fix: prevent other plugin types from using dynamic tracing and troubleshooting panel configurations #498

Conversation

PeterYurkovich
Copy link
Contributor

COO-178

This PR looks the address the comments made on #480 about fixing the configuration validations for the distributed tracing and troubleshooting panel console plugins.

These configurations are currently entirely optional for both plugins, so we don't need to enforce the configuration existing if the plugin exists. We only need to prevent other plugins from using the configuration if they don't have the associated type.

@PeterYurkovich PeterYurkovich requested a review from a team as a code owner June 5, 2024 19:11
@PeterYurkovich PeterYurkovich requested review from danielmellado and JoaoBraveCoding and removed request for a team June 5, 2024 19:11
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Jun 5, 2024

@PeterYurkovich: This pull request references COO-178 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.17.0" version, but no target version was set.

In response to this:

COO-178

This PR looks the address the comments made on #480 about fixing the configuration validations for the distributed tracing and troubleshooting panel console plugins.

These configurations are currently entirely optional for both plugins, so we don't need to enforce the configuration existing if the plugin exists. We only need to prevent other plugins from using the configuration if they don't have the associated type.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link

openshift-ci bot commented Jun 5, 2024

Hi @PeterYurkovich. Thanks for your PR.

I'm waiting for a rhobs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@PeterYurkovich PeterYurkovich force-pushed the coo-178-fix-tp-and-dt-validation branch from af03595 to 5ce5f2f Compare June 5, 2024 19:17
@danielmellado
Copy link
Contributor

/lgtm

@danielmellado
Copy link
Contributor

/hold

@danielmellado
Copy link
Contributor

/assign @simonpasquier

@@ -149,6 +149,8 @@ type LokiStackReference struct {

// UIPluginSpec is the specification for desired state of UIPlugin.
//
// +kubebuilder:validation:XValidation:rule="self.type == 'TroubleshootingPanel' || !has(self.troubleshootingPanel)", message="TroubleshootingPanel type is required to use Troubleshooting Panel configuration"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// +kubebuilder:validation:XValidation:rule="self.type == 'TroubleshootingPanel' || !has(self.troubleshootingPanel)", message="TroubleshootingPanel type is required to use Troubleshooting Panel configuration"
// +kubebuilder:validation:XValidation:rule="self.type == 'TroubleshootingPanel' || !has(self.troubleshootingPanel)", message="Troubleshooting panel configuration is only supported with the TroubleshootingPanel type"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the wording of the message of all the TroubleshootingPanel validations

@@ -149,6 +149,8 @@ type LokiStackReference struct {

// UIPluginSpec is the specification for desired state of UIPlugin.
//
// +kubebuilder:validation:XValidation:rule="self.type == 'TroubleshootingPanel' || !has(self.troubleshootingPanel)", message="TroubleshootingPanel type is required to use Troubleshooting Panel configuration"
// +kubebuilder:validation:XValidation:rule="self.type == 'DistributedTracing' || !has(self.distributedTracing)", message="DistributedTracing type is required to use Distributed Tracing configuration"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the wording of the message of all the DistributedTracing validations

@PeterYurkovich PeterYurkovich force-pushed the coo-178-fix-tp-and-dt-validation branch from 59d3cba to c652261 Compare June 6, 2024 15:08
Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm label Jun 7, 2024
Copy link

openshift-ci bot commented Jun 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: PeterYurkovich, simonpasquier

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Jun 7, 2024
@jgbernalp
Copy link
Contributor

/unhold

@openshift-merge-bot openshift-merge-bot bot merged commit 07ae4ef into rhobs:main Jun 7, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants